import http from "@/utils/http/hub";

/**
 * 银行卡列表
 */
export const getBankCardList = (params, config = {}) => {
  return http.post({
    url: `/bankAccount/getList`,
    params,
    config,
  });
};

/**
 * 检测实名&银行卡&签约
 */
export const walletCheck = (params, config = {}) => {
  return http.get({
    url: `/bankAccount/walletCheck`,
    params,
    config,
  });
};

/**
 * 绑定银行卡
 */
export const bindBankCard = (params, config = {}) => {
  return http.post({
    url: `/bankAccount/create`,
    params,
    config,
  });
};

/**
 * 解绑银行卡
 */
export const destroyBankCard = (params, config = {}) => {
  return http.post({
    url: `/bankAccount/destroy`,
    params,
    config,
  });
};

/**
 * 获取签约地址
 */
export const getSignUrl = (params, config = {}) => {
  return http.post({
    url: `/bankAccount/getSignUrl`,
    params,
    config,
  });
};
